#ifndef CONTRACTCOMMON_HPP
#define CONTRACTCOMMON_HPP


#include "timeSequence.hpp"

namespace TermStructure
{
    //! A structure that has a time sequence in it.
    /*! A structure that has a time sequence in it. Many products and pricers need TimeSequence<T,TSize>, and this provides a common utility to fciliate the programming.
     Note that TimeSequence<T,TSize> can be modified in these classes
     */
	template<typename T, typename TSize = long>
	class TimeSequenceHolder
	{
	protected:
        //! The underlying time sequence.
		TimeSequence<T,TSize> *_timeSequence;
	public:
        //! Get the underlying time sequence.
		virtual const TimeSequence<T,TSize> &GetTimeSequence() const
		{
			return *this->_timeSequence;
		}
        //! Set the underlying time sequence.
		virtual void SetTimeSequence(TimeSequence<T,TSize> &times)
		{
			this->_timeSequence = &times;
		}
	};
}

#endif